//
//  StwxItemCell.m
//  EnvironmentalProtection
//
//  Created by HCreater on 2018/10/23.
//  Copyright © 2018年 HCreater. All rights reserved.
//

#import "StwxItemCell.h"

@interface StwxItemCell()

/// viewModle
@property (nonatomic, readwrite, strong) StwxItemViewModel *viewModel;

/// IBOutlet
@property (weak, nonatomic) IBOutlet UILabel* contentLabel;
@property (weak, nonatomic) IBOutlet UILabel* goodNumLabel;
@property (weak, nonatomic) IBOutlet UILabel* commentNumLabel;
@property (weak, nonatomic) IBOutlet UILabel* readNumLabel;
@property (weak, nonatomic) IBOutlet UILabel* readLastDateLabel;
@property (weak, nonatomic) IBOutlet UILabel* checkResultLabel;
@property (weak, nonatomic) IBOutlet UIButton* moreBtn;

@end

@implementation StwxItemCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

#pragma mark - bind data
- (void)bindViewModel:(StwxItemViewModel *)viewModel
{
    self.viewModel = viewModel;
    
    self.contentLabel.text = self.viewModel.content;
    self.goodNumLabel.text = self.viewModel.goodNum;
    self.commentNumLabel.text = self.viewModel.commentNum;
    self.readLastDateLabel.text = self.viewModel.readLastDate;
    self.readNumLabel.text = self.viewModel.readNum;
    self.checkResultLabel.text = self.viewModel.checkResult;
    
    self.moreBtn.rac_command = self.viewModel.moreCmd;
}

@end
